% Constants:
% Structure containing useful physical constants. Mainly, fundamental
% constants and Rubidium 87 parameters.
%
% Use example:
% cst = Constants;
% E = cst.hbar * omega;
% E = cst.kB * T;
%
% T. Vanderbruggen, 2013

function const = Constants()
    % --- Fundamental constants (CODATA 2010)
    const.c     = 299792458;                % Speed of light in vacuum (m/s)
    const.mu0   = 4*pi*1E-7;                % Magnetic constant (N/A^2)
    const.eps0  = 1/(const.mu0*const.c^2);  % Electric constant (F/m)
    const.G     = 6.67384E-11;              % Newtonian constant of gravitation (m^3/kg/s^−2)
    const.h     = 6.62606957E-34;           % Planck constant (J.s)
    const.hbar  = const.h/(2*pi);           % Reduced Planck constant (J.s)
    const.e     = 1.602176565E-19;          % Elementary charge (C)
    const.kB    = 1.3806488E-23;            % Boltzmann constant (J/K)
    const.amu   = 1.660538921E-27;          % Atomic mass unit (kg)
    const.muB   = 927.400968E-26;           % Bohr magneton (J/T)
    const.aB    = 0.52917721092E-10;        % Bohr radius (m)
    const.me    = 9.10938291E-31;           % Electron mass (kg)
    const.ge    = -2.00231930436153;        % Electron Lande factor
    
    % --- Rubidium 87
    % Mass (from CODATA 2010)
    const.massRb87amu = 86.909180535;                                            % Rb 87 mass (amu)
    const.massRb87kg  = const.massRb87amu*const.amu;                             % Rb 87 mass (kg)
    % Lande factors
    const.gF1         = -0.5;                                                    % F = 1
    const.gF2         = +0.5;                                                    % F = 2
    % D2 transition (from http://steck.us/alkalidata/rubidium87numbers.pdf)
    const.lambdaD2    = 780.241209686E-9;                                        % Wavelength D2 transition in vacuum (m)
    const.Gamma       = 6.0666E6;                                                % Natural linewidth (FWHM) (Hz)
    const.Tr          = 361.96E-9;                                               % Single photon recoil temperature (K)
    const.kr          = sqrt(const.Tr*2*const.massRb87kg*const.kB/const.hbar^2); % Single photon recoil momentum (m^-1)
    const.vr          = 5.8845E-3;                                               % Recoil velocity (m/s)
    const.Td          = 145.57E-6;                                               % Doppler temperature (K)
    % Saturation intensities
    const.Isat_iso    = 3.57713E1;                                               % Isotropic light polarization (W/m^2)
    const.Isat_lin    = 2.50399E1;                                               % Pi-polarized light (W/m^2)
    const.Isat_circ   = 1.66933E1;                                               % Sigma-polarized light (W/m^2)
    % Resonant scattering cross-sections
    const.sigma0_iso  = 1.356456704270E-13;                                      % Isotropic light polarization (m^2)
    const.sigma0_lin  = 1.937795291814E-13;                                      % Pi-polarized light (m^2)
    const.sigma0_circ = 2.906692937721E-13;                                      % Sigma-polarized light (m^2)
    % s-wave scattering lengths (m)
    const.a0          = 101.8*const.aB;                                          
    const.a2          = 100.4*const.aB;
    const.sigma       = 8*pi*const.a0^2;                                         % Cross section (m^2)
    % Collisionnal interaction parameters
    const.c0          = 4*pi*const.hbar^2*(const.a0 + 2*const.a2)/(3*const.massRb87kg); % J.m^3
    const.c2          = 4*pi*const.hbar^2*(const.a2 - const.a0)/(3*const.massRb87kg);   % J.m^3
    % Dipolar interaction parameter
    const.cd          = const.mu0 * const.muB^2 * const.gF1^2 /(4*pi);                  % J.m^3
    % Three body recombination rate = K3b * n0^2, where
    const.K3b         = 1.8E-17;                                                 % s^-1.m^-6
    % Ratio of polarisability of P3/2 excited state to S1/2 ground state
    const.pol         = 46.3;
    
    % --- Miscelaneous
    const.g0 = 9.80665; % Standard gravitationnal acceleration ISO 80000-3 (m/s^2)
    const.um = 1e6;    % Conversion from MKS to micro-MKS
end

